From: Jonas Ã…dahl Date: Fri, 22 May 2015 08:39:31 +0000 (+0800) Subject: wayland: Position popups relative to the parent surface X-Git-Tag: archive/raspbian/3.24.39-1+rpi1~1^2~65^2~39^2~6647 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=0f47d1bac4e859fd99fac30b41f3523cb5db7f7e;p=gtk%2B3.0.git wayland: Position popups relative to the parent surface According to the xdg-shell protocol specification the (x, y) coordinates passed when creating a popup surface is relative to top left corner of the parent surface, but prior to this patch, if the parent surface was an xdg_surface, we'd position it relative to top left corner of the window geometry of that xdg_surface. https://bugzilla.gnome.org/show_bug.cgi?id=749717 --- diff --git a/gdk/wayland/gdkwindow-wayland.c b/gdk/wayland/gdkwindow-wayland.c index 507013c5d5..19d92244dd 100644 --- a/gdk/wayland/gdkwindow-wayland.c +++ b/gdk/wayland/gdkwindow-wayland.c @@ -1108,12 +1108,6 @@ gdk_wayland_window_create_xdg_popup (GdkWindow *window, x = window->x - parent_x; y = window->y - parent_y; - if (parent_impl->xdg_surface) - { - x -= parent_impl->margin_left; - y -= parent_impl->margin_top; - } - impl->xdg_popup = xdg_shell_get_xdg_popup (display->xdg_shell, impl->surface, parent_impl->surface,